package org.zxp.designpattern.factory.abstractfactory.factory;

import org.zxp.designpattern.factory.abstractfactory.animal.Animal;
import org.zxp.designpattern.factory.abstractfactory.animal.Fish;
import org.zxp.designpattern.factory.abstractfactory.animal.NoAnimal;
import org.zxp.designpattern.factory.abstractfactory.enums.AnimalType;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2019-08-21 11:03
 **/
public class EastBaseFactory implements AbstractFactory {
    @Override
    public Animal getAnimal(AnimalType animalType) {
        switch (animalType){
            case FISH:
                return new Fish();
        }
        return new NoAnimal();
    }
}
